# Define a class named "District"
# 分区
class district:
	def __init__(
			self,
			id: str = None,
			name: str = None,
			area: float = None,
			person: list = None,
			person_city: list = None,
			person_county: list = None,
			plant: list = None,
			iav: list = None,
			regression: list = None,
			aw_sum: float = None,
			aw: list = None,
			iw_sum: float = None,
			iw: list = None,
			dw_sum: float = None,
			dw: list = None,
			ew_sum: float = None,
			ew: list = None,
			gw_capacity: float = None,
			gw_max: float = None,
			gw: list = None,
			w_wds: float = None,
			w_other: float = None,
            demandsum:float =0,
            demandratio:float=1,
            predemand:float=0,
			stations: list = None,
			intakes: list = None):
		#需水部分数据填入
		self.id = id  # 计算分区id 01-010100
		self.name = name  # 计算分区名称 北京潮白河山区
		self.area = area  # 计算分区面积 4725.421895
		self.person = person  # 总人数 对应需水入参中total_population_values 下同为需水入参对应数据
		self.person_city = person_city  # 城镇人数 urban_population_values
		self.person_county = person_county  # 非城镇人数 rural_population_values
		self.plant = plant  # 农业灌溉面积 farmarea
		self.iav = iav  # 工业增加值 indva
		self.regression = regression  # 回归水系数 ucoe
		self.aw_sum = aw_sum  # 农业用水总量 就放需水出参中的data["farm"]["2023"]["P50IGVo"]
		self.aw = aw  # 农业用水 data["farm"]["2023"]["P50IGVopre"]
		self.iw_sum = iw_sum  # 工业用水总量 data["indurstry"]["2023"]["TIndGVoN"]
		self.iw = iw  # 工业用水 data["indurstry"]["2023"]["TIndGVoNpre"]
		self.dw_sum = dw_sum  # 生活用水总量 data["life"]["2023"]["LGVO"]
		self.dw = dw  # 生活用水 data["life"]["2023"]["lgvopre"]
		self.ew_sum = ew_sum  # 生态用水总量 data["forest"]["2023"]["FPNVo"]+data["animals"]["2023"]["LGvo"] 这个是两个数相加直接加
		self.ew = ew  # 生态用水 data["forest"]["2023"]["FPNVopre"]+data["animals"]["2023"]["LGvopre"] 这是两个列表相加，先用numpy的numpy.array(data)把这两个列表转成数组a和b，数组把两个列表的数一一对应的求和a=a+b，list(a)在把a转成列表放在这
		self.gw_capacity = gw_capacity  # 地下水提水能力 sql里有
		self.gw_max = gw_max  # 地下水允许使用最大量 sql里有
		self.w_wds = w_wds  # 外调水量 sql里有
		self.w_other = w_other  # 其他水量 sql里有 如果没有填0
		# self.stations = stations  # 区域内水库 station类的实例列表 拓扑解析填入
		# self.intakes = intakes  # 区域内取水口 intake类的实例列表 拓扑解析填入

		self.gw = gw  # 地下水使用过程 主程序算出来的结果 不需要输入
        self.demandsum = demandsum#剩余缺水总量
		self.predemand = predemand#缺水绿
		self.demandratio = demandratio#分配前缺水量


	def getId(self):
		return self.id
	
	def setId(self, id: str = None):
		self.id = id
	
	def getName(self):
		return self.name
	
	def setName(self, name: str = None):
		self.name = name
	
	def getArea(self):
		return self.area
	
	def setArea(self, area: float = None):
		self.area = area
	
	def getPerson(self):
		return self.person
	
	def setPerson(self, person: float = None):
		self.person = person
	
	def getPersonCity(self):
		return self.person_city
	
	def setPersonCity(self, person_city: float = None):
		self.person_city = person_city
	
	def getPersonCounty(self):
		return self.person_county
	
	def setPersonCounty(self, person_county: float = None):
		self.person_county = person_county
	
	def getPlant(self):
		return self.plant
	
	def setPlant(self, plant: float = None):
		self.plant = plant
	
	def getIav(self):
		return self.iav
	
	def setIav(self, iav: float = None):
		self.iav = iav
	
	def getEcol(self):
		return self.ecol
	
	def setEcol(self, ecol: float = None):
		self.ecol = ecol
	
	def getRegression(self):
		return self.regression
	
	def setRegression(self, regression: float = None):
		self.regression = regression
	
	def getAwSum(self):
		return self.aw_sum
	
	def setAwSum(self, aw_sum: float = None):
		self.aw_sum = aw_sum
	
	def getAw(self):
		return self.aw
	
	def setAw(self, aw: list = None):
		self.aw = aw
	
	def getIwSum(self):
		return self.iw_sum
	
	def setIwSum(self, iw_sum: float = None):
		self.iw_sum = iw_sum
	
	def getIw(self):
		return self.iw
	
	def setIw(self, iw: list = None):
		self.iw = iw
	
	def getDwSum(self):
		return self.dw_sum
	
	def setDwSum(self, dw_sum: float = None):
		self.dw_sum = dw_sum
	
	def getDw(self):
		return self.dw
	
	def setDw(self, dw: list = None):
		self.dw = dw
	
	def getEwSum(self):
		return self.ew_sum
	
	def setEwSum(self, ew_sum: float = None):
		self.ew_sum = ew_sum
	
	def getEw(self):
		return self.ew
	
	def setEw(self, ew: list = None):
		self.ew = ew
	
	def getGwCapacity(self):
		return self.gw_capacity
	
	def setGwCapacity(self, gw_capacity: float = None):
		self.gw_capacity = gw_capacity
	
	def getGwMax(self):
		return self.gw_max
	
	def setGwMax(self, gw_max: float = None):
		self.gw_max = gw_max
	
	def getGw(self):
		return self.gw
	
	def setGw(self, gw: float = None):
		self.gw = gw
	
	def getwWDS(self):
		return self.w_wds
	
	def setwWDS(self, w_wds: float = None):
		self.w_wds = w_wds
	
	def getwOther(self):
		return self.w_other
	
	def setwOther(self, w_other: float = None):
		self.w_other = w_other
	
	# def getStations(self):
	# 	return self.stations
	#
	# def setStations(self, stations: list = None):
	# 	self.stations = stations
	#
	# def getIntakes(self):
	# 	return self.intakes
	#
	# def setIntakes(self, intakes: list = None):
	# 	self.intakes = intakes
	#